import 'package:dio/dio.dart';

import 'dio/BaseModel.dart';
import 'dio/DioClient.dart';

class AlarmApi {



  //直连锁设置
  Future<BaseModel> directLock(Map<String, dynamic> formData) async {
    BaseModel response =  await DioClient().doDio(
        "/alarm/directLock",
        method: HTTPMethod.post,
        data: formData,
        loading: true
    );
    return response;
  }




  //Io 报警设置
  Future<BaseModel> updateIoAlarm(Map<String, dynamic> formData) async {
    BaseModel response =  await DioClient().doDio(
        "/alarm/updateIoAlarm",
        method: HTTPMethod.post,
        data: formData,
        loading: true
    );
    return response;
  }


  //app消息提醒
  Future<BaseModel> appMessageAlarm(Map<String, dynamic> formData) async {
    BaseModel response =  await DioClient().doDio(
        "/alarm/appMessageAlarm",
        method: HTTPMethod.post,
        data: formData,
        loading: true
    );
    return response;
  }



  //时间段 按钮设置
  Future<BaseModel> updateTimeButton(Map<String, dynamic> formData) async {
    BaseModel response =  await DioClient().doDio(
        "/alarm/updateTimeButton",
        method: HTTPMethod.post,
        data: formData,
        loading: true
    );
    return response;
  }




  //时间段设置
  Future<BaseModel> updateDataSelect(Map<String, dynamic> formData) async {
    BaseModel response =  await DioClient().doDio(
        "/alarm/updateDataSelect",
        method: HTTPMethod.post,
        data: formData,
        loading: true
    );
    return response;
  }


  Future<BaseModel> getAlarmInfo(Map<String, dynamic> formData) async {
    BaseModel response =  await DioClient().doDio(
        "/alarm/getAlarmInfo",
        method: HTTPMethod.post,
        data: formData,
        loading: true
    );
    return response;
  }


  //移动侦测防区设置按钮
  Future<BaseModel> updateMotionAndDefenseButton(Map<String, dynamic> formData) async {
    BaseModel response =  await DioClient().doDio(
        "/alarm/updateMotionAndDefenseButton",
        method: HTTPMethod.post,
        data: formData,
        loading: true
    );
    return response;
  }








}